/***************************************************************************
* COPYRIGHT NOTICE
* Copyright 2019 prothes.
* All rights reserved.
***************************************************************************/
#ifndef UTILITY_SENSOR_INC_IMX307_SETTING_H_
#define UTILITY_SENSOR_INC_IMX307_SETTING_H_

#ifdef __cplusplus
extern "C" {
#endif

#define MIPI_2LINE	1
//#define MIPI_4LINE    1

#define IMX307_GAIN         	(0x3014)
#define IMX307_SHS1             (0x3020)
#define IMX307_SHS2             (0x3024)
#define IMX307_SHS3             (0x3028)
#define IMX307_VAMX	          	(0x3018)
#define IMX307_HAMX	        	(0x301C)
#define IMX307_RHS1				(0x3030)
#define IMX307_RHS2				(0x3034)
#define IMX307_FPGC				(0x3010)
#define IMX307_FPGC_1			(0x30f0)
#define IMX307_FPGC_2			(0x30f4)
#define IMX307_GAIN1			(0x30f2)
#define IMX307_GAIN2			(0x30f6)
#define IMX307_CSI_LANE_MODE    (0x3443)
#define IMX307_INCKSEL6         (0x3164)
#define IMX307_X_SIZE           (0x3472)
#define IMX307_Y_SIZE           (0x3418)
#define IMX307_PARAM_HOLD       (0x3001)

typedef enum IMX307_FPS_TYPE
{
    IMX307_10FPS = 10,
	IMX307_15FPS = 15,
	IMX307_25FPS = 25,
	IMX307_30FPS = 30,
	IMX307_60FPS = 60
} SEN_FPS_TYPE_E;

static uint32_t imx307_stream_on_setting[] = {
	0x3002, 0x00,
	0x3000, 0x00
};

static uint32_t imx307_stream_off_setting[] = {
	0x3000, 0x01
};

static uint32_t imx307_10fps_normal_setting[] = {
	0x3018,	0x7A,	// Pair of 0x3019
	0x3019,	0x0D,	// VMAX[17:0], 0x0465 = 3450
};

static uint32_t imx307_25fps_normal_setting[] = {
	0x3018,	0x65,	// Pair of 0x3019
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125
};

static uint32_t imx307_15fps_normal_setting[] = {
	0x3018,	0xFC,	// Pair of 0x3019
	0x3019,	0x08,	// VMAX[17:0], 0x0465 = 1125 1150
};

static uint32_t imx307_30fps_normal_setting[] = {
	0x3018,	0x65,	// Pair of 0x3019
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125 0x04b0 = 1200
};

static uint32_t imx307_60fps_normal_setting[] = {
	0x3018,	0x65,	// Pair of 0x3019
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125 0x04b0 = 1200
};

static uint32_t imx307_25fps_dol2_setting[] = {
	0x3018,	0x65,	// Pair of 0x3019
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1380
};
static uint32_t imx307_15fps_dol2_setting[] = {
	0x3018,	0x65,	// Pair of 0x3019
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 2300
};
static uint32_t imx307_30fps_dol2_setting[] = {
	0x3018,	0x65,	// Pair of 0x3019
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125 0x04b0 = 1150
};

static uint32_t imx307_gain_lut[] = {
	0x0,
	0x1,
	0x2,
	0x2,
	0x3,
	0x4,
	0x4,
	0x5,
	0x6,
	0x6,
	0x7,
	0x7,
	0x8,
	0x9,
	0x9,
	0xA,
	0xB,
	0xB,
	0xC,
	0xC,
	0xD,
	0xE,
	0xE,
	0xF,
	0x10,
	0x10,
	0x11,
	0x11,
	0x12,
	0x13,
	0x13,
	0x14,
	0x15,
	0x15,
	0x16,
	0x16,
	0x17,
	0x18,
	0x18,
	0x19,
	0x1A,
	0x1A,
	0x1B,
	0x1B,
	0x1C,
	0x1D,
	0x1D,
	0x1E,
	0x1F,
	0x1F,
	0x20,
	0x20,
	0x21,
	0x22,
	0x22,
	0x23,
	0x24,
	0x24,
	0x25,
	0x26,
	0x26,
	0x27,
	0x27,
	0x28,
	0x29,
	0x29,
	0x2A,
	0x2B,
	0x2B,
	0x2C,
	0x2C,
	0x2D,
	0x2E,
	0x2E,
	0x2F,
	0x30,
	0x30,
	0x31,
	0x31,
	0x32,
	0x33,
	0x33,
	0x34,
	0x35,
	0x35,
	0x36,
	0x36,
	0x37,
	0x38,
	0x38,
	0x39,
	0x3A,
	0x3A,
	0x3B,
	0x3B,
	0x3C,
	0x3D,
	0x3D,
	0x3E,
	0x3F,
	0x3F,
	0x40,
	0x40,
	0x41,
	0x42,
	0x42,
	0x43,
	0x44,
	0x44,
	0x45,
	0x45,
	0x46,
	0x47,
	0x47,
	0x48,
	0x49,
	0x49,
	0x4A,
	0x4B,
	0x4B,
	0x4C,
	0x4C,
	0x4D,
	0x4E,
	0x4E,
	0x4F,
	0x50,
	0x50,
	0x51,
	0x51,
	0x52,
	0x53,
	0x53,
	0x54,
	0x55,
	0x55,
	0x56,
	0x56,
	0x57,
	0x58,
	0x58,
	0x59,
	0x5A,
	0x5A,
	0x5B,
	0x5B,
	0x5C,
	0x5D,
	0x5D,
	0x5E,
	0x5F,
	0x5F,
	0x60,
	0x60,
	0x61,
	0x62,
	0x62,
	0x63,
	0x64,
	0x64,
	0x65,
	0x65,
	0x66,
	0x67,
	0x67,
	0x68,
	0x69,
	0x69,
	0x6A,
	0x6A,
	0x6B,
	0x6C,
	0x6C,
	0x6D,
	0x6E,
	0x6E,
	0x6F,
	0x70,
	0x70,
	0x71,
	0x71,
	0x72,
	0x73,
	0x73,
	0x74,
	0x75,
	0x75,
	0x76,
	0x76,
	0x77,
	0x78,
	0x78,
	0x79,
	0x7A,
	0x7A,
	0x7B,
	0x7B,
	0x7C,
	0x7D,
	0x7D,
	0x7E,
	0x7F,
	0x7F,
	0x80,
	0x80,
	0x81,
	0x82,
	0x82,
	0x83,
	0x84,
	0x84,
	0x85,
	0x85,
	0x86,
	0x87,
	0x87,
	0x88,
	0x89,
	0x89,
	0x8A,
	0x8A,
	0x8B,
	0x8C,
	0x8C,
	0x8D,
	0x8E,
	0x8E,
	0x8F,
	0x8F,
	0x90,
	0x91,
	0x91,
	0x92,
	0x93,
	0x93,
	0x94,
	0x95,
	0x95,
	0x96,
	0x96,
	0x97,
	0x98,
	0x98,
	0x99,
	0x9A,
	0x9A,
	0x9B,
	0x9B,
	0x9C,
	0x9D,
	0x9D,
	0x9E,
	0x9F,
	0x9F,
	0xA0,
	0xA0,
};

#if MIPI_2LINE
//mark 2lane 25fps 1080P row12
static uint32_t imx307_1080p_2line_linear_25fps_setting[] = {
   	0x3000, 0x01,	// Standby
	0x3003, 0x01,	// SW_RESET
	0x3002, 0x00,	// Master Mode

	0x3005, 0x01,	// [0:0] 0:AD-10bit		1:AD-12bit
	0x3007, 0x00,	// [7:4] 0:FHD1080, 1:HD720, 4: Crop from FHD
	0x3009, 0x02,	// [1:0] FRSEL, [4:4] FDG_SEL
	0x300a, 0xf0,	// [7:0] BlkLevel // f0
	0x300b, 0x00,	// [bit8] BlkLevel
	0x3011, 0x0a,	// Set to 0x0a // 02
	// 0x3012, 0x0a,
	0x3014, 0x00,
	0x3018,	0x65,	// Pair of 0x3019 0x301a
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125
	0x301a,	0x00,	// VMAX[17:0], 0x0465 = 1125 0x565=1381
	0x301c, 0xa0,	// Pair of 301d
	0x301d, 0x14,	// HMAX[15:9], <<1080p>> 0x1130:30FPS, 0x14A0:25FPS
	0x3020, 0x00,
	0x3021, 0x00,
	0x3022, 0x00,	// SHS1[17:0],
	0x3046, 0x01,	// ODBIT[0:0] 0:10bit, 1:12bit  [7:4] LVDS, MIPI don't care
	0x3048, 0x00,
	0x3049, 0x08,
	0x304b, 0x0A,	// XVS[1:0]=VSYNC Output, XHS[3:2]=HSYNC Output. ?? Why we need to set this ??
	0x305c, 0x18,	// INCKSEL1 ?
	0x305d, 0x03,	// INCKSEL2 ?
	0x305e, 0x20,	// INCKSEL3 ?
	0x305f, 0x01,	// INCKSEL4 ?
	0x309e, 0x4A,	// Set to 0x4A
	0x309f, 0x4A,	// Set to 0x4A
	0x30d2, 0x19,	// Set to 0x19
	0x30d7,	0x03,	// Set to 0x03
	
	0x311c, 0x0E,	// Set to 0x0E
	0x3128, 0x04,	// Set to 0x04
	0x3129, 0x00,	// ADBIT1[7:0] 0x00:12bit, 0x1d:10bit
	0x313b, 0x41,	// Set to 0x41
	0x315e, 0x1a,	// INCKSEL5 0x1a:37.125MHz, 0x1b:74.25MHz
	0x3164, 0x1a,	// INCKSEL6 0x1a:37.125MHz, 0x1b:74.25MHz
	0x317c, 0x00,	// ADBIT2[7:0] 0x00:12bit, 0x12:10bit
	0x31ec, 0x0E,	// ADBIT3[7:0] 0x0E:12bit, 0x37:10bit
	
	0x3405, 0x10,	// REPRTITIOM[5:4] Ref to Output Signal Interface Control ??
	0x3407, 0x01,	// PHY_LANE_NUM[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3414, 0x0a,	// OPB_SIZE_V[5:0]
	//0x3418, 0x49,	// Pair or 0x3419
	0x3418, 0x38,	// Pair or 0x3419
	0x3419, 0x04,	// Y_OUT_SIZE[12:0],  0x449 = 1097 0x438=1080
	0x3441, 0x0c,	// Pair of 0x3442
	0x3442, 0x0c,	// CSI_DT_FMT[15:0] 0x0A0A:RAW10, 0x0C0C:RAW12
	0x3443, 0x01,	// CSI_LANE_MODE[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3444, 0x20,	// Pair of 0x3445
	0x3445, 0x25,	// EXTCK_FREQ[15:0] 0x2520:37.125MHz, 0x4A40:74.25MHz
	0x3446, 0x57,
	0x3447, 0x00,
	0x3448, 0x37,
	0x3449, 0x00,
	0x344a, 0x1f,
	0x344b, 0x00,
	0x344c, 0x1f,
	0x344d, 0x00,
	0x344e, 0x1f,
	0x344f, 0x00,
	0x3450, 0x77,
	0x3451, 0x00,
	0x3452, 0x1f,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	// 0x3472, 0x9c,	// Pair od 0x3473
	0x3472, 0x80,	// Pair od 0x3473
	0x3473, 0x07,	// X_OUT_SIZE[12:0]	0x07a0 = 1952 0x0780=1920 0x79c=1948
	0x3480, 0x49,	// INCKSEL7[7:0] 0x49:37.125MHz, 0x92:74.25MHz
};

//ok_fix
static uint32_t imx307_1080p_2lane_linear_30fps_setting[] = {
   	0x3000, 0x01,	// Standby
	// 0x3003, 0x01,	// SW_RESET
	// 0x3002, 0x00,	// Master Mode

	0x3005, 0x01,	// [0:0] 0:AD-10bit		1:AD-12bit
	0x3007, 0x02,	// [7:4] 0:FHD1080, 1:HD720, 4: Crop from FHD
	0x3009, 0x12,	// [1:0] FRSEL, [4:4] FDG_SEL
	0x300a, 0xf0,	// [7:0] BlkLevel // f0
	0x300b, 0x00,	// [bit8] BlkLevel

        // 0x300c, 0x11, // sony -- dol2
        // 0x3010, 0x21, // sony -- dol2
	0x3011, 0x0a,	// Set to 0x0a // 02
	// 0x3012, 0x0a,
	0x3014, 0x00,
	0x3018,	0x65,	// Pair of 0x3019 0x301a
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125
	0x301a,	0x00,	// VMAX[17:0], 0x0465 = 1125 0x565=1381
	0x301c, 0x30,	// Pair of 301d
	0x301d, 0x11,	// HMAX[15:9], <<1080p>> 0x1130:30FPS, 0x14A0:25FPS
	0x3020, 0x00,
	0x3021, 0x00,
	0x3022, 0x00,	// SHS1[17:0],
	0x3046, 0x01,	// ODBIT[0:0] 0:10bit, 1:12bit  [7:4] LVDS, MIPI don't care
	// 0x3048, 0x00,
	// 0x3049, 0x08,
	// 0x304b, 0x0A,	// XVS[1:0]=VSYNC Output, XHS[3:2]=HSYNC Output. ?? Why we need to set this ??
	0x305c, 0x18,	// INCKSEL1 ?
	0x305d, 0x03,	// INCKSEL2 ?
	0x305e, 0x20,	// INCKSEL3 ?
	0x305f, 0x01,	// INCKSEL4 ?
        0x315e, 0x1a,
        0x3164, 0x1a,
        0x3480, 0x49,

	0x309e, 0x4A,	// Set to 0x4A
	0x309f, 0x4A,	// Set to 0x4A
	// 0x30d2, 0x19,	// Set to 0x19
	// 0x30d7,	0x03,	// Set to 0x03
	
	0x311c, 0x0E,	// Set to 0x0E
	0x3128, 0x04,	// Set to 0x04
	0x3129, 0x00,	// ADBIT1[7:0] 0x00:12bit, 0x1d:10bit
	0x313b, 0x41,	// Set to 0x41
	0x315e, 0x1a,	// INCKSEL5 0x1a:37.125MHz, 0x1b:74.25MHz
	0x3164, 0x1a,	// INCKSEL6 0x1a:37.125MHz, 0x1b:74.25MHz
	0x317c, 0x00,	// ADBIT2[7:0] 0x00:12bit, 0x12:10bit
	0x31ec, 0x0E,	// ADBIT3[7:0] 0x0E:12bit, 0x37:10bit
	
	0x3405, 0x10,	// REPRTITIOM[5:4] Ref to Output Signal Interface Control ??
	0x3407, 0x01,	// PHY_LANE_NUM[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3414, 0x0a,	// OPB_SIZE_V[5:0]
        // 0x3415, 0x00,   // sony purper
	0x3418, 0x49,	// Pair or 0x3419
	// 0x3418, 0x38,	// Pair or 0x3419
	0x3419, 0x04,	// Y_OUT_SIZE[12:0],  0x449 = 1097 0x438=1080
	0x3441, 0x0c,	// Pair of 0x3442
	0x3442, 0x0c,	// CSI_DT_FMT[15:0] 0x0A0A:RAW10, 0x0C0C:RAW12
	0x3443, 0x01,	// CSI_LANE_MODE[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3444, 0x20,	// Pair of 0x3445
	0x3445, 0x25,	// EXTCK_FREQ[15:0] 0x2520:37.125MHz, 0x4A40:74.25MHz
	0x3446, 0x57,
	0x3447, 0x00,
	0x3448, 0x37,
	0x3449, 0x00,
	0x344a, 0x1f,
	0x344b, 0x00,
	0x344c, 0x1f,
	0x344d, 0x00,
	0x344e, 0x1f,
	0x344f, 0x00,
	0x3450, 0x77,
	0x3451, 0x00,
	0x3452, 0x1f,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	// 0x3472, 0x9c,	// Pair od 0x3473
	0x3472, 0x80,	// Pair od 0x3473
	0x3473, 0x07,	// X_OUT_SIZE[12:0]	0x07a0 = 1952 0x0780=1920 0x79c=1948
	0x3480, 0x49,	// INCKSEL7[7:0] 0x49:37.125MHz, 0x92:74.25MHz
};


//Sony IMX307_cropping_1080_12bit_2Lane_MIPI_Master_I2C_Normal_30fps_mode1_37p125MHz_201203.txt
// check color
static uint32_t imx307_1080p_2lane_linear_30fps_setting_sony[] = {
// Nomal Mode register setting
// 1080P30fps,12Bit,I2C,MIPI 2lane,ADC12Bit
// 1920*1080,30fps

0x3000,0x01, // Standby mode
0x3002,0x01, // Master mode stop
0x3005,0x01, // 0: 10bit, 1: 12bit
0x3007,0x40, // WINMODE
0x3009,0x02, // 30fps;0x00->120fps
0x300a,0x3c, // 
0x3011,0x0a,

0x3018,0x65, // VMAX
0x3019,0x04, 
0x301c,0x30, // HMAX;30fps;0xA0->25fps
0x301d,0x11, // HMAX;30fps;0x14->25fps

0x3046,0x01,	
0x305c,0x18, // 37.125MHz INCK Setting

0x305d,0x03,	
0x305e,0x20,	
0x305f,0x01,	

0x309e,0x4a,	
0x309f,0x4a,	
0x311c,0x0e,	
0x3128,0x04,	
0x3129,0x00, // ADBIT1

0x313b,0x41,
0x315e,0x1a, // 37.125MHz INCK5 Setting
0x3164,0x1a, 

0x3020,0x09, // exposure time setting, Maximum 
0x3021,0x00, 
0x3014,0x0f, // Gain register setting 0DB

0x317c,0x00, // ADBIT2
0x31ec,0x0e, // ADBIT3

//0x3404,0x01 
0x3405,0x10, 
0x3407,0x01, 

0x3414,0x06, //OPB_SIZE_V
0x3418,0x38, //Y_OUT_SIZE
0x3419,0x04, 
0x3441,0x0c,
0x3442,0x0c,

0x3443,0x01,
0x3444,0x20,
0x3445,0x25,
0x3446,0x57,
0x3447,0x00,
0x3448,0x37,
0x3449,0x00,
0x344A,0x1f,
0x344B,0x00,
0x344C,0x1F,
0x344D,0x00,
0x344E,0x1f,
0x344F,0x00,
0x3450,0x77,
0x3451,0x00,
0x3452,0x1F,
0x3453,0x00,
0x3454,0x17,
0x3455,0x00,
0x3472,0x80,
0x3473,0x07,
0x3480,0x49, // 37.125MHz INCK7 Setting

0x303a,0x06, // WINWV_OB,6-12H
0x303C,0x08, // WINPV
0x303D,0x00, // WINPV

0x303E,0x38, // WINWV
0x303F,0x04, // WINWV

0x3040,0x0c, // WINPH
0x3041,0x00, // WINPH

0x3042,0x80, // WINWH
0x3043,0x07, // WINWH

};

// Sony IMX307_cropping_1080_12bit_2Lane_MIPI_Master_I2C_DOL2F_15fps_37p125MHz_1125H_210111.txt
static uint32_t imx307_1080p_2lane_dol2_15fps_setting[] = {

// Enter Standby
0x3000,0x01, // Standby mode
0x3002,0x01, // Master mode stop

0x3005,0x01,
0x3007,0x40,
0x3009,0x01, // 30fps;0x00->120fps
0x300a,0xf0,
0x300c,0x11,
0x3010,0x21,
0x3011,0x0a,
0x3018,0x65,	// VMAX:1125d
0x3019,0x04,
0x301a,0x00,

0x301c,0x30,	// HMAX;4400d,30fps
0x301d,0x11, 	// HMAX;

0x3020,0x02,	// SHS1
0x3021,0x00,
0x3024,0x89,	// SHS2
0x3025,0x00,

0x3030,0x87,	// RHS1
0x3031,0x00,
0x3045,0x05,

0x3046,0x01,	//LVDS 4CH;12Bit
0x305c,0x18,	//37.125MHz INCK Setting
0x305d,0x03,
0x305e,0x20,
0x305f,0x01,
0x309e,0x4a,
0x309f,0x4a,

0x3106,0x11,

0x311c,0x0e,
0x3128,0x04,
0x3129,0x00,	// ADBIT1,12Bit;
0x313b,0x41,
0x315e,0x1a,	// 37.125MHz INCK5 Setting
0x3164,0x1a,

0x303a,0x06,	// WINWV_OB,6-12H
0x303C,0x08,	// WINPV
0x303D,0x00,	// WINPV

0x303E,0x38,	// WINWV
0x303F,0x04,	// WINWV

0x3040,0x0C,	// WINPH
0x3041,0x00,	// WINPH

0x3042,0x80,	// WINWH
0x3043,0x07,	// WINWH

0x317c,0x00,	// ADBIT2,12Bit;
0x31ec,0x0e,	// ADBIT3,12Bit;

//CHIP ID 06 For MIPI I/F
0x3405, 0x00,
0x3407, 0x01,
0x3414, 0x06,	//OPB_SIZE_V
0x3415, 0x00,
0x3418, 0x30,	//Y_OUT_SIZE
0x3419, 0x09,	//Y_OUT_SIZE
0x3441, 0x0c,
0x3442, 0x0c,
0x3443, 0x01, 	
0x3444, 0x20,
0x3445, 0x25,
0x3446, 0x77,
0x3447, 0x00,
0x3448, 0x67,
0x3449, 0x00,
0x344A, 0x47,
0x344B, 0x00,
0x344C, 0x37,
0x344D, 0x00,
0x344E, 0x3f,
0x344F, 0x00,
0x3450, 0xff,
0x3451, 0x00,
0x3452, 0x3F,
0x3453, 0x00,
0x3454, 0x37,
0x3455, 0x00,
0x3472, 0x84,
0x3473, 0x07,
0x347b, 0x23,
0x3480, 0x49,	// 37.125MHz INCK7 Setting
0x346a, 0x84,
0x346b, 0x07,

//0x3204, 0x4A
//0x3209, 0xF0
//0x320A, 0x22
//0x3344, 0x38

};

// FAIL HD1080P
static uint32_t imx307_1080p_2lane_linear_60fps_setting[] = {
   	0x3000, 0x01,	// Standby
	0x3003, 0x01,	// SW_RESET
	0x3002, 0x00,	// Master Mode

	0x3005, 0x01,	// [0:0] 0:AD-10bit		1:AD-12bit
	0x3007, 0x00,	// [7:4] 0:FHD1080, 1:HD720, 4: Crop from FHD
	0x3009, 0x01,	// [1:0] FRSEL, [4:4] FDG_SEL
	0x300a, 0xf0,	// [7:0] BlkLevel // f0
	0x300b, 0x00,	// [bit8] BlkLevel
	0x3011, 0x0a,	// Set to 0x0a // 02
	// 0x3012, 0x0a,
	0x3014, 0x00,
	0x3018,	0x65,	// Pair of 0x3019 0x301a
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125
	0x301a,	0x00,	// VMAX[17:0], 0x0465 = 1125 0x565=1381
	0x301c, 0x98,	// Pair of 301d
	0x301d, 0x08,	// HMAX[15:9], <<1080p>> 0x1130:30FPS, 0x14A0:25FPS
	0x3020, 0x00,
	0x3021, 0x00,
	0x3022, 0x00,	// SHS1[17:0],
	0x3046, 0x01,	// ODBIT[0:0] 0:10bit, 1:12bit  [7:4] LVDS, MIPI don't care
	0x3048, 0x00,
	0x3049, 0x08,
	0x304b, 0x0A,	// XVS[1:0]=VSYNC Output, XHS[3:2]=HSYNC Output. ?? Why we need to set this ??
	0x305c, 0x18,	// INCKSEL1 ?
	0x305d, 0x03,	// INCKSEL2 ?
	0x305e, 0x20,	// INCKSEL3 ?
	0x305f, 0x01,	// INCKSEL4 ?
	0x309e, 0x4A,	// Set to 0x4A
	0x309f, 0x4A,	// Set to 0x4A
	0x30d2, 0x19,	// Set to 0x19
	0x30d7,	0x03,	// Set to 0x03
	
	0x311c, 0x0E,	// Set to 0x0E
	0x3128, 0x04,	// Set to 0x04
	0x3129, 0x00,	// ADBIT1[7:0] 0x00:12bit, 0x1d:10bit
	0x313b, 0x41,	// Set to 0x41
	0x315e, 0x1a,	// INCKSEL5 0x1a:37.125MHz, 0x1b:74.25MHz
	0x3164, 0x1a,	// INCKSEL6 0x1a:37.125MHz, 0x1b:74.25MHz
	0x317c, 0x00,	// ADBIT2[7:0] 0x00:12bit, 0x12:10bit
	0x31ec, 0x0E,	// ADBIT3[7:0] 0x0E:12bit, 0x37:10bit
	
	0x3405, 0x00,	// REPRTITIOM[5:4] Ref to Output Signal Interface Control ??
	0x3407, 0x01,	// PHY_LANE_NUM[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3414, 0x0a,	// OPB_SIZE_V[5:0]
	// 0x3418, 0x49,	// Pair or 0x3419
	0x3418, 0x38,	// Pair or 0x3419
	0x3419, 0x04,	// Y_OUT_SIZE[12:0],  0x449 = 1097 0x438=1080
	0x3441, 0x0c,	// Pair of 0x3442
	0x3442, 0x0c,	// CSI_DT_FMT[15:0] 0x0A0A:RAW10, 0x0C0C:RAW12
	0x3443, 0x01,	// CSI_LANE_MODE[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3444, 0x20,	// Pair of 0x3445
	0x3445, 0x25,	// EXTCK_FREQ[15:0] 0x2520:37.125MHz, 0x4A40:74.25MHz
	0x3446, 0x77,
	0x3447, 0x00,
	0x3448, 0x67,
	0x3449, 0x00,
	0x344a, 0x47,
	0x344b, 0x00,
	0x344c, 0x37,
	0x344d, 0x00,
	0x344e, 0x3f,
	0x344f, 0x00,
	0x3450, 0xff,
	0x3451, 0x00,
	0x3452, 0x3f,
	0x3453, 0x00,
	0x3454, 0x37,
	0x3455, 0x00,
	// 0x3472, 0x9c,	// Pair od 0x3473
	0x3472, 0x80,	// Pair od 0x3473
	0x3473, 0x07,	// X_OUT_SIZE[12:0]	0x07a0 = 1952 0x0780=1920 0x79c=1948
	0x3480, 0x49,	// INCKSEL7[7:0] 0x49:37.125MHz, 0x92:74.25MHz
};

//mark 2lane 25fps 720P row12
static uint32_t imx307_720p_2line_linear_25fps_setting[] = {
   	0x3000, 0x01,	// Standby
	0x3003, 0x01,	// SW_RESET
	0x3002, 0x00,	// Master Mode

	0x3005, 0x01,	// [0:0] 0:AD-10bit		1:AD-12bit
	0x3007, 0x00,	// [7:4] 0:FHD1080, 1:HD720, 4: Crop from FHD
	0x3009, 0x02,	// [1:0] FRSEL, [4:4] FDG_SEL
	0x300a, 0xf0,	// [7:0] BlkLevel
	0x300b, 0x00,	// [bit8] BlkLevel
	0x3011, 0x0a,	// Set to 0x0a
	0x3012, 0x0a,
	0x3014, 0x00,
	0x3018,	0x65,	// Pair of 0x3019 0x301a
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125
	0x301a,	0x00,	// VMAX[17:0], 0x0465 = 1125 0x565=1381
	0x301c, 0xa0,	// Pair of 301d
	0x301d, 0x14,	// HMAX[15:9], <<1080p>> 0x1130:30FPS, 0x14A0:25FPS
	0x3020, 0x00,
	0x3021, 0x00,
	0x3022, 0x00,	// SHS1[17:0],
	0x3046, 0x01,	// ODBIT[0:0] 0:10bit, 1:12bit  [7:4] LVDS, MIPI don't care
	0x3048, 0x00,
	0x3049, 0x08,
	0x304b, 0x0A,	// XVS[1:0]=VSYNC Output, XHS[3:2]=HSYNC Output. ?? Why we need to set this ??
	0x305c, 0x18,	// INCKSEL1 ?
	0x305d, 0x03,	// INCKSEL2 ?
	0x305e, 0x20,	// INCKSEL3 ?
	0x305f, 0x01,	// INCKSEL4 ?
	0x309e, 0x4A,	// Set to 0x4A
	0x309f, 0x4A,	// Set to 0x4A
	0x30d2, 0x19,	// Set to 0x19
	0x30d7,	0x03,	// Set to 0x03
	
	0x311c, 0x0E,	// Set to 0x0E
	0x3128, 0x04,	// Set to 0x04
	0x3129, 0x00,	// ADBIT1[7:0] 0x00:12bit, 0x1d:10bit
	0x313b, 0x41,	// Set to 0x61
	0x315e, 0x1a,	// INCKSEL5 0x1a:37.125MHz, 0x1b:74.25MHz
	0x3164, 0x1a,	// INCKSEL6 0x1a:37.125MHz, 0x1b:74.25MHz
	0x317c, 0x00,	// ADBIT2[7:0] 0x00:12bit, 0x12:10bit
	0x31ec, 0x0E,	// ADBIT3[7:0] 0x0E:12bit, 0x37:10bit
	
	0x3405, 0x10,	// REPRTITIOM[5:4] Ref to Output Signal Interface Control ??
	0x3407, 0x01,	// PHY_LANE_NUM[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3414, 0x0a,	// OPB_SIZE_V[5:0]
	//0x3418, 0x49,	// Pair or 0x3419
	0x3418, 0x38,	// Pair or 0x3419
	0x3419, 0x04,	// Y_OUT_SIZE[12:0],  0x449 = 1097 0x438=1080
	0x3441, 0x0c,	// Pair of 0x3442
	0x3442, 0x0c,	// CSI_DT_FMT[15:0] 0x0A0A:RAW10, 0x0C0C:RAW12
	0x3443, 0x01,	// CSI_LANE_MODE[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3444, 0x20,	// Pair of 0x3445
	0x3445, 0x25,	// EXTCK_FREQ[15:0] 0x2520:37.125MHz, 0x4A40:74.25MHz
	0x3446, 0x57,
	0x3447, 0x00,
	0x3448, 0x37,
	0x3449, 0x00,
	0x344a, 0x1f,
	0x344b, 0x00,
	0x344c, 0x1f,
	0x344d, 0x00,
	0x344e, 0x1f,
	0x344f, 0x00,
	0x3450, 0x77,
	0x3451, 0x00,
	0x3452, 0x1f,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	//0x3472, 0x80,	// Pair od 0x3473
	0x3472, 0x9c,	// Pair od 0x3473
	0x3473, 0x07,	// X_OUT_SIZE[12:0]	0x07a0 = 1952 0x0780=1920 0x79c=1948
	0x3480, 0x49,	// INCKSEL7[7:0] 0x49:37.125MHz, 0x92:74.25MHz
};

//mark 2lane 25fps 1948x1097 row12
static uint32_t imx307_1097p_2line_linear_25fps_setting[] = {
   	0x3000, 0x01,	// Standby
	0x3003, 0x01,	// SW_RESET
	0x3002, 0x00,	// Master Mode

	0x3005, 0x01,	// [0:0] 0:AD-10bit		1:AD-12bit
	0x3007, 0x00,	// [7:4] 0:FHD1080, 1:HD720, 4: Crop from FHD
	0x3009, 0x02,	// [1:0] FRSEL, [4:4] FDG_SEL
	0x300a, 0xf0,	// [7:0] BlkLevel
	0x300b, 0x00,	// [bit8] BlkLevel
	0x3011, 0x0a,	// Set to 0x0a
	0x3012, 0x0a,
	0x3014, 0x00,
	0x3018,	0x65,	// Pair of 0x3019 0x301a
	0x3019,	0x04,	// VMAX[17:0], 0x0465 = 1125
	0x301a,	0x00,	// VMAX[17:0], 0x0465 = 1125 0x565=1381
	0x301c, 0xa0,	// Pair of 301d
	0x301d, 0x14,	// HMAX[15:9], <<1080p>> 0x1130:30FPS, 0x14A0:25FPS
	0x3020, 0x00,
	0x3021, 0x00,
	0x3022, 0x00,	// SHS1[17:0],
	0x3046, 0x01,	// ODBIT[0:0] 0:10bit, 1:12bit  [7:4] LVDS, MIPI don't care
	0x3048, 0x00,
	0x3049, 0x08,
	0x304b, 0x0A,	// XVS[1:0]=VSYNC Output, XHS[3:2]=HSYNC Output. ?? Why we need to set this ??
	0x305c, 0x18,	// INCKSEL1 ?
	0x305d, 0x03,	// INCKSEL2 ?
	0x305e, 0x20,	// INCKSEL3 ?
	0x305f, 0x01,	// INCKSEL4 ?
	0x309e, 0x4A,	// Set to 0x4A
	0x309f, 0x4A,	// Set to 0x4A
	0x30d2, 0x19,	// Set to 0x19
	0x30d7,	0x03,	// Set to 0x03
	
	0x311c, 0x0E,	// Set to 0x0E
	0x3128, 0x04,	// Set to 0x04
	0x3129, 0x00,	// ADBIT1[7:0] 0x00:12bit, 0x1d:10bit
	0x313b, 0x41,	// Set to 0x41
	0x315e, 0x1a,	// INCKSEL5 0x1a:37.125MHz, 0x1b:74.25MHz
	0x3164, 0x1a,	// INCKSEL6 0x1a:37.125MHz, 0x1b:74.25MHz
	0x317c, 0x00,	// ADBIT2[7:0] 0x00:12bit, 0x12:10bit
	0x31ec, 0x0E,	// ADBIT3[7:0] 0x0E:12bit, 0x37:10bit
	
	0x3405, 0x10,	// REPRTITIOM[5:4] Ref to Output Signal Interface Control ??
	0x3407, 0x01,	// PHY_LANE_NUM[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3414, 0x0a,	// OPB_SIZE_V[5:0]
	0x3418, 0x49,	// Pair or 0x3419
	//0x3418, 0x38,	// Pair or 0x3419
	0x3419, 0x04,	// Y_OUT_SIZE[12:0],  0x449 = 1097 0x438=1080
	0x3441, 0x0c,	// Pair of 0x3442
	0x3442, 0x0c,	// CSI_DT_FMT[15:0] 0x0A0A:RAW10, 0x0C0C:RAW12
	0x3443, 0x01,	// CSI_LANE_MODE[1:0], 0:x, 1:2Lane, 3:x, 3:4Lane
	0x3444, 0x20,	// Pair of 0x3445
	0x3445, 0x25,	// EXTCK_FREQ[15:0] 0x2520:37.125MHz, 0x4A40:74.25MHz
	0x3446, 0x57,
	0x3447, 0x00,
	0x3448, 0x37,
	0x3449, 0x00,
	0x344a, 0x1f,
	0x344b, 0x00,
	0x344c, 0x1f,
	0x344d, 0x00,
	0x344e, 0x1f,
	0x344f, 0x00,
	0x3450, 0x77,
	0x3451, 0x00,
	0x3452, 0x1f,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	0x3472, 0x9c,	// Pair od 0x3473
	//0x3472, 0x80,	// Pair od 0x3473
	0x3473, 0x07,	// X_OUT_SIZE[12:0]	0x07a0 = 1952 0x0780=1920 0x79c=1948
	0x3480, 0x49,	// INCKSEL7[7:0] 0x49:37.125MHz, 0x92:74.25MHz
};

#endif

/*sony dol3*/
static uint32_t imx307_3609p_dol3_15fps_setting[] = {
		0x3000, 0x01,
   		0x3002, 0x00,
		0x3005, 0x01,
		0x3405, 0x10,
		0x3106, 0x33,
		0x3007, 0x00,
		0x3407, 0x03,
		0x3009, 0x01,
		0x300A, 0xF0,
		0x300C, 0x21,
		0x3011, 0x02,
		0x3414, 0x00,   // OB
		0x3415, 0x00,
		0x3018, 0x7E,
		0x3019, 0x04,  // VMAX 1150 framelength = 4vmax = 4600
		0x3418, 0x19,
		0x3419, 0x0E,
		0x301C, 0x68,
		0x301D, 0x08,  // HMAX 2152 = linelenght
		0x3020, 0x05,
		0x3021, 0x00,
		0x3024, 0x0B,
		0x3025, 0x01,
		0x3028, 0x93,
		0x3029, 0x01,
		0x3129, 0x00,
		0x3030, 0x06,
		0x3031, 0x01,
		0x3034, 0x1C,
		0x3035, 0x01,
		0x313B, 0x61,
		0x3441, 0x0C,
		0x3442, 0x0C,
		0x3443, 0x03,
		0x3444, 0x20,
		0x3045, 0x05,
		0x3445, 0x25,
		0x3046, 0x01,
		0x3446, 0x57,
		0x3447, 0x00,
		0x3448, 0x37,
		0x3449, 0x00,
		0x344A, 0x1F,
		0x304B, 0x0A,
		0x344B, 0x00,
		0x344C, 0x1F,
		0x344D, 0x00,
		0x344E, 0x1F,
		0x344F, 0x00,
		0x3450, 0x77,
		0x3451, 0x00,
		0x3452, 0x1F,
		0x3453, 0x00,
		0x3454, 0x17,
		0x3455, 0x00,
		0x305C, 0x18,
		0x305D, 0x03,
		0x305E, 0x20,
		0x315E, 0x1A,
		0x305F, 0x01,
		0x3164, 0x1A,
		0x3472, 0xA0,
		0x3473, 0x07,
		0x347B, 0x23,
		0x317C, 0x00,
		0x3480, 0x49,
		0x309E, 0x4A,
		0x309F, 0x4A,
		0x30D2, 0x19,
		0x30D7, 0x03,
		0x31EC, 0x0E,
		0x3010, 0x61
};

//sony 4lane Dol2 1952x2228
static uint32_t imx307_2228p_dol2_25fps_setting[] = {
		0x3000, 0x01,
   		0x3002, 0x00,
		0x3005, 0x01,
		0x3405, 0x10,
		0x3106, 0x11,
		0x3007, 0x00,
		0x3407, 0x03,
		0x3009, 0x01,
		0x300A, 0xF0,
		0x300C, 0x11,
		0x3011, 0x02,
		0x3414, 0x00, //
		0x3415, 0x00,
		0x3018, 0x64, // VMAX 1380
		0x3019, 0x05,
		0x3418, 0xB4,
		0x3419, 0x08,
		0x301C, 0x68,
		0x301D, 0x08, // HMAX 2152 = linelength
		0x3020, 0x02,  //
		0x3021, 0x00,
		0x3024, 0x49,
		0x3025, 0x08,
		0x3129, 0x00,
		0x3030, 0x0B,
		0x3031, 0x00,
		0x313B, 0x61,
		0x3441, 0x0C,
		0x3442, 0x0C,
		0x3443, 0x03,
		0x3444, 0x20,
		0x3045, 0x05,
		0x3445, 0x25,
		0x3046, 0x01,
		0x3446, 0x57,
		0x3447, 0x00,
		0x3448, 0x37,
		0x3449, 0x00,
		0x344A, 0x1F,
		0x304B, 0x0A,
		0x344B, 0x00,
		0x344C, 0x1F,
		0x344D, 0x00,
		0x344E, 0x1F,
		0x344F, 0x00,
		0x3450, 0x77,
		0x3451, 0x00,
		0x3452, 0x1F,
		0x3453, 0x00,
		0x3454, 0x17,
		0x3455, 0x00,
		0x305C, 0x18,
		0x305D, 0x03,
		0x305E, 0x20,
		0x315E, 0x1A,
		0x305F, 0x01,
		0x3164, 0x1A,
		0x3472, 0xA0,  //1952
		0x3473, 0x07,
		0x347B, 0x23,
		0x317C, 0x00,
		0x3480, 0x49,
		0x309E, 0x4A,
		0x309F, 0x4A,
		0x30D2, 0x19,
		0x30D7, 0x03,
		0x31EC, 0x0E,
		0x3010, 0x61,
};

//sony 4lane Dol2 1952x2228
static uint32_t imx307_2228p_dol2_30fps_setting[] = {
		0x3000, 0x01,
		0x3002, 0x00,
		0x3005, 0x01,
		0x3405, 0x10,
		0x3106, 0x11,
		0x3007, 0x00,
		0x3407, 0x03,
		0x3009, 0x01,
		0x300A, 0xF0,
		0x300C, 0x11,
		0x3011, 0x02,
		0x3414, 0x00,
		0x3415, 0x00,
		0x3018, 0x7E, // VMAX 1150
		0x3019, 0x04,
		0x3418, 0xB4,
		0x3419, 0x08,
		0x301C, 0x68,
		0x301D, 0x08, // HMAX 2152 = linelength must > 2136 手册dol appnote page35
		0x3020, 0x03,
		0x3021, 0x00,
		0x3024, 0x49,
		0x3025, 0x08,
		0x3129, 0x00,
		0x3030, 0x0B,
		0x3031, 0x00,
		0x313B, 0x61,
		0x3441, 0x0C,
		0x3442, 0x0C,
		0x3443, 0x03,
		0x3444, 0x20,
		0x3045, 0x05,
		0x3445, 0x25,
		0x3046, 0x01,
		0x3446, 0x57,
		0x3447, 0x00,
		0x3448, 0x37,
		0x3449, 0x00,
		0x344A, 0x1F,
		0x304B, 0x0A,
		0x344B, 0x00,
		0x344C, 0x1F,
		0x344D, 0x00,
		0x344E, 0x1F,
		0x344F, 0x00,
		0x3450, 0x77,
		0x3451, 0x00,
		0x3452, 0x1F,
		0x3453, 0x00,
		0x3454, 0x17,
		0x3455, 0x00,
		0x305C, 0x18,
		0x305D, 0x03,
		0x305E, 0x20,
		0x315E, 0x1A,
		0x305F, 0x01,
		0x3164, 0x1A,
		0x3472, 0xA0,  //1952
		0x3473, 0x07,
		0x347B, 0x23,
		0x317C, 0x00,
		0x3480, 0x49,
		0x309E, 0x4A,
		0x309F, 0x4A,
		0x30D2, 0x19,
		0x30D7, 0x03,
		0x31EC, 0x0E,
		0x3010, 0x61,
};

static uint32_t imx307_720p_dol2_25fps_setting[] = {
	0x3000, 0x01,
	0x3002, 0x00,
	0x3005, 0x01,
	0x3405, 0x10,
	0x3105, 0x11,
	0x3007, 0x10,
	0x3407, 0x03,
	0x3009, 0x01,
	0x300A, 0xF0,
	0x300C, 0x11,
	0x3011, 0x02,
	0x3414, 0x00,   // OB
	0x3415, 0x00,
	0x3018, 0x08,
	0x3418, 0xBA,
	0x3019, 0x07,
	0x3419, 0x05,
	0x301C, 0xE4,
	0x301D, 0x0C,
	0x3020, 0x02,
	0x3021, 0x00,
	0x3024, 0x7B,
	0x3025, 0x05,
	0x3129, 0x00,
	0x3030, 0x09,
	0x3031, 0x00,
	0x313B, 0x61,
	0x3441, 0x0C,
	0x3442, 0x0C,
	0x3443, 0x03,
	0x3444, 0x20,
	0x3045, 0x05,
	0x3445, 0x25,
	0x3046, 0x01,
	0x3446, 0x4F,
	0x3447, 0x00,
	0x3448, 0x2F,
	0x3449, 0x00,
	0x344A, 0x17,
	0x3048, 0x0A,
	0x3448, 0x00,
	0x344C, 0x17,
	0x344D, 0x00,
	0x344E, 0x17,
	0x344F, 0x00,
	0x3450, 0x57,
	0x3451, 0x00,
	0x3452, 0x17,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	0x305C, 0x20,
	0x305D, 0x00,
	0x305E, 0x20,
	0x315E, 0x1A,
	0x305F, 0x01,
	0x3164, 0x1A,
	0x3472, 0x20,
	0x3473, 0x05,
	0x347B, 0x23,
	0x317C, 0x00,
	0x3480, 0x49,
	0x309E, 0x4A,
	0x309F, 0x4A,
	0x30D2, 0x19,
	0x30D7, 0x03,
	0x31EC, 0x0E,
};

static uint32_t imx307_720p_dol2_30fps_setting[] = {
	0x3000, 0x01,
	0x3002, 0x00,
	0x3005, 0x01,
	0x3405, 0x10,
	0x3106, 0x11,
	0x3007, 0x10,
	0x3407, 0x03,
	0x3009, 0x01,
	0x300A, 0xF0,
	0x300C, 0x11,
	0x3011, 0x02,
	0x3414, 0x00,  // OB
	0x3415, 0x00,
	0x3018, 0xDC,
	0x3418, 0xBA,
	0x3019, 0x05,
	0x3419, 0x05,
	0x301C, 0xE4,
	0x301D, 0x0C,
	0x3020, 0x02,
	0x3021, 0x00,
	0x3024, 0x7B,
	0x3025, 0x05,
	0x3129, 0x00,
	0x3030, 0x09,
	0x3031, 0x00,
	0x313B, 0x61,
	0x3441, 0x0C,
	0x3442, 0x0C,
	0x3443, 0x03,
	0x3444, 0x20,
	0x3045, 0x05,
	0x3445, 0x25,
	0x3046, 0x01,
	0x3446, 0x4F,
	0x3447, 0x00,
	0x3448, 0x2F,
	0x3449, 0x00,
	0x344A, 0x17,
	0x304B, 0x0A,
	0x344B, 0x00,
	0x344C, 0x17,
	0x344D, 0x00,
	0x344E, 0x17,
	0x344F, 0x00,
	0x3450, 0x57,
	0x3451, 0x00,
	0x3452, 0x17,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	0x305C, 0x20,
	0x305D, 0x00,
	0x305E, 0x20,
	0x315E, 0x1A,
	0x305F, 0x01,
	0x3164, 0x1A,
	0x3472, 0x20,
	0x3473, 0x05,
	0x347B, 0x23,
	0x317C, 0x00,
	0x3480, 0x49,
	0x309E, 0x4A,
	0x309F, 0x4A,
	0x30D2, 0x19,
	0x30D7, 0x03,
	0x31EC, 0x0E,
};

static uint32_t imx307_1080p_dol2_25fps_setting[] = {
	0x3000, 0x01,
	0x3002, 0x00,
	0x3005, 0x01,
	0x3405, 0x10,
	0x3106, 0x11,
	0x3007, 0x40,
	0x3407, 0x03,
	0x3009, 0x01,
	0x300A, 0xF0,
	0x300C, 0x11,
	0x3011, 0x02,
	0x3414, 0x00,  // OB
	0x3415, 0x00,
	0x3018, 0x46,
	0x3418, 0x26,
	0x3019, 0x05,
	0x3419, 0x09,
	0x301C, 0x98,
	0x301D, 0x08,
	0x3020, 0x02,
	0x3021, 0x00,
	0x3024, 0xab,
	0x3025, 0x00,
	0x3129, 0x00,
	0x3030, 0xa1,
	0x3031, 0x00,
	0x303A, 0x06,
	0x313B, 0x61,
	0x303C, 0x08,
	0x303D, 0x00,
	0x303E, 0x38,
	0x303F, 0x04,
	0x3040, 0x0C,
	0x3041, 0x00,
	0x3441, 0x0C,
	0x3042, 0x80,
	0x3442, 0x0C,
	0x3043, 0x07,
	0x3443, 0x03,
	0x3444, 0x20,
	0x3045, 0x05,
	0x3445, 0x25,
	0x3046, 0x01,
	0x3446, 0x57,
	0x3447, 0x00,
	0x3448, 0x37,
	0x3449, 0x00,
	0x344A, 0x1F,
	0x304B, 0x0A,
	0x344B, 0x00,
	0x344C, 0x1F,
	0x344D, 0x00,
	0x344E, 0x1F,
	0x344F, 0x00,
	0x3450, 0x77,
	0x3451, 0x00,
	0x3452, 0x1F,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	0x315C, 0x18,
	0x315D, 0x03,
	0x305E, 0x20,
	0x315E, 0x1A,
	0x305F, 0x01,
	0x3164, 0x1A,
	0x3472, 0x84,
	0x3473, 0x07,
	0x347B, 0x23,
	0x317C, 0x00,
	0x3480, 0x49,
	0x319E, 0x4A,
	0x319F, 0x4A,
	0x30D2, 0x19,
	0x30D7, 0x03,
	0x31EC, 0x0E,
};

static uint32_t imx307_1080p_dol2_30fps_setting[] = {
	0x3000, 0x01,
	0x3002, 0x00,
	0x3005, 0x01,
	0x3410, 0x10,
	0x3106, 0x11,
	0x3007, 0x40,
	0x3407, 0x03,
	0x3009, 0x01,
	0x300A, 0xF0,
	0x300C, 0x11,
	0x3011, 0x02,
	0x3414, 0x00,  // OB
	0x3415, 0x00,
	0x3018, 0x65,
	0x3418, 0x26,
	0x3019, 0x04,
	0x3419, 0x09,
	0x301C, 0x98,
	0x301D, 0x08,
	0x3020, 0x02,
	0x3021, 0x00,
	0x3024, 0xAB,
	0x3025, 0x00,
	0x3129, 0x00,
	0x3030, 0xA1,
	0x3031, 0x00,
	0x303A, 0x06,
	0x313B, 0x61,
	0x303C, 0x08,
	0x303D, 0x00,
	0x303E, 0x38,
	0x303F, 0x04,
	0x3040, 0x0C,
	0x3041, 0x00,
	0x3441, 0x0C,
	0x3042, 0x80,
	0x3442, 0x0C,
	0x3043, 0x07,
	0x3443, 0x03,
	0x3444, 0x20,
	0x3045, 0x05,
	0x3445, 0x25,
	0x3046, 0x01,
	0x3446, 0x57,
	0x3447, 0x00,
	0x3448, 0x37,
	0x3449, 0x00,
	0x344A, 0x1F,
	0x304B, 0x0A,
	0x344B, 0x00,
	0x344C, 0x1F,
	0x344D, 0x00,
	0x344E, 0x1F,
	0x344F, 0x00,
	0x3450, 0x77,
	0x3451, 0x00,
	0x3452, 0x1F,
	0x3453, 0x00,
	0x3454, 0x17,
	0x3455, 0x00,
	0x305C, 0x18,
	0x305D, 0x03,
	0x305E, 0x20,
	0x315E, 0x1A,
	0x305F, 0x01,
	0x3164, 0x1A,
	0x3472, 0x84,
	0x3473, 0x07,
	0x347B, 0x23,
	0x317C, 0x00,
	0x3480, 0x49,
	0x309E, 0x4A,
	0x309F, 0x4A,
	0x30D2, 0x19,
	0x30D7, 0x03,
	0x31EC, 0x0E,
};


#ifdef __cplusplus
}
#endif

#endif  // UTILITY_SENSOR_INC_IMX307_SETTING_H_


